cap program drop textab
program define textab
	syntax , title(string) data(string) name(string) width(string) file(string) replace notesize(string) note_paper(string) /// Specs.
             inpath(string) path_paper(string)																				/// Paths

	tempname f
	
	/*Paper*/
	
    file open `f' using "`path_paper'`name'.tex", write `replace'
    file w `f' " \begin{table}[ht!]" _n
    file w `f' " \centering" _n
    file w `f' " \begin{minipage}{1\textwidth}" _n
    file w `f' " \caption{`title'}" _n
    file w `f' " \label{tab: `name'}" _n
    file w `f' " \input{../results/tables/`name'.`file'} \\" _n
	file w `f' " \""`notesize' \textbf{Data:} `data'.\\" _n
    file w `f' " \""`notesize' \textbf{Note:} `note_paper'\\" _n
    file w `f' " \end{minipage}" _n
    file w `f' " \end{table}" _n
    file close `f'
	
	
end

